﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master/HomeMaster.Master" AutoEventWireup="true"
    CodeBehind="List.aspx.cs" Inherits="CSP.Web.MyHome.Authentication.List" %>

<asp:Content ID="CSPHead" ContentPlaceHolderID="CSPHead" runat="server">
    <meta charset="utf-8">
    <title>资质认证</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
</asp:Content>
<asp:Content ID="CSPStyleAndScript" ContentPlaceHolderID="CSPStyleAndScript" runat="server">
    <link href="/Styles/lib/jquery-ui/jquery-ui-1.8.22.custom.css" rel="stylesheet" type="text/css" />
    <link href="/Styles/lib/jquery-ui/jquery.ui.button.css" rel="stylesheet" type="text/css" />
    <script src="/Scripts/UI/Jquery/jquery.ui.core.js" type="text/javascript"></script>
    <script src="/Scripts/UI/Jquery/jquery.ui.widget.min.js" type="text/javascript"></script>
    <script src="/Scripts/UI/Jquery/jquery.ui.position.min.js" type="text/javascript"></script>
    <script src="/Scripts/UI/Jquery/jquery.ui.dialog.js" type="text/javascript"></script>
    <script src="/Scripts/UI/Expand/dialog.js" type="text/javascript"></script>
    <script language="javascript">

        function deleteConfirm(id) {
            DialogMessage.Init("提示", "确定要删除此条信息？").dialog({
                resizable: false,
                width: 300,
                height: 140,
                modal: true,
                buttons: {
                    "确定": function () {
                        $(this).dialog("close");
                        $.ajax({
                            type: "get",
                            dataType: "json",
                            //data: { OrderNumber: ordernumber, ShipmentID:shipmentID, Notes: notes, Action: "CancelShipmentByID" },
                            url: "List.aspx?op=delete&id=" + id,
                            async: false,
                            error: function (result) {
                                result;
                            },
                            success: function (data, textStatus) {
                                data;
                                //执行成功
                                if (data.status == 1) {
                                    dilaogMessage(1, data.msg, function () {
                                        window.location.href = "list.aspx";
                                    });
                                }
                                else {
                                    dilaogMessage(0, data.msg);
                                }
                            }
                        });

                    },
                    "取消": function () {
                        $(this).dialog("close");
                    }
                }
            });
        }

        //弹出message信息框 status=0错误,1成功，2警告
        function dilaogMessage(status, msg,fn) {

            //var dialogObj = $('<div id="dialog-message" title="Success"><span class="ui-icon ui-icon-circle-check" style="float: left; margin: 0 7px 50px 0;"></span><div>111</div></div>');
            //dialogObj.find("div").html(msg);
            var dialogObj;
            if (status == 0) {
                dialogObj = DialogMessage.Init("Error", msg);
            } else if (status == 1) {

                dialogObj = DialogMessage.Init("Successfully", msg);
            } else if (status == 2) {
                dialogObj = DialogMessage.Init("Warn", msg);
            }

            dialogObj.dialog({
                modal: true,
                buttons: {
                    确定: function () {
                        $(this).dialog("close");
                        fn();
                    }
                }
            });

        }
    </script>
</asp:Content>
<asp:Content ID="CSPCrumbs" ContentPlaceHolderID="CSPCrumbs" runat="server">
    <div class="crumbs">
        <span>您当前所在的位置：</span> <a href="/">首页</a> &gt; <a href="/MyHome/Account/Management.aspx">我的家园</a> &gt; <span>资质认证</span>
    </div>
    <!--crumbs-->
</asp:Content>
<asp:Content ID="CSPRight" ContentPlaceHolderID="CSPRight" runat="server">
    <div style="display: none">
        <!--delete confirm-->
        <div id="delete-confirm" title="删除确认">
            <p>
                <span class="ui-icon ui-icon-alert" style="float: left; margin: 0 7px 20px 0;"></span>
                确定要删除此条信息？</p>
        </div>
        <%--<div id="dialog-message" title="Success"><span class="ui-icon ui-icon-circle-check" style="float: left; margin: 0 7px 50px 0;"></span><div></div></div>--%>
    </div>
    <div class="pr10 home">
        <div class="tabs tabs-home mt10">
            <div class="tabs-nd">
                <ul class="tabs-hd">
                    <li class="trigger current">申请认证</li>
                </ul>
                <div class="tabs-act">
                    <a href="/Help/HelpAuthoriz.aspx" class="fc-blue">为什么要认证？</a></div>
            </div>
            <div class="tabs-bd">
                <div class="tabs-panel">
                    <table width="80%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td width="12%" align="right">
                                &nbsp;
                            </td>
                            <td width="10%" height="40" align="right">
                                &nbsp;
                            </td>
                            <td colspan="2">
                                &nbsp;
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                &nbsp;
                            </td>
                            <td height="40" align="right">
                                个人认证：
                            </td>
                            <td colspan="2">
                                <asp:Label ID="LB_PersonalAuthentication" runat="server"><a class="fc-blue" href="CreateAuthentication.aspx?type=0">点击认证 </a>
                                </asp:Label>
                                <asp:Label ID="LB_PersonalAuthenticationType" runat="server">(尚未认证)</asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                &nbsp;
                            </td>
                            <td height="40" align="right">
                                机构认证：
                            </td>
                            <td colspan="2">
                                <asp:Label ID="LB_EnterpriseAuthentication" runat="server"><a class="fc-blue" href="CreateAuthentication.aspx?type=1">点击认证 </a>
                                </asp:Label>
                                <asp:Label ID="LB_EnterpriseAuthenticationType" runat="server">(尚未认证)</asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td align="right">
                                &nbsp;
                            </td>
                            <td height="20" colspan="3" align="left">
                                &nbsp;
                            </td>
                        </tr>
                    </table>
                    <p style="margin-top: 20px; text-align: right;">
                        <a class="fc-blue" href="/Help/HelpAuthoriz.aspx">什么是资质认证？</a> <a href="AddCertificate.aspx" class="ui-btn-big sl-rc">
                            <span class="sl-rc-cnt">+新增资质证书</span></a></p>
                    <asp:Repeater ID="R_AuthenticationInfo" ViewStateMode="Disabled" runat="server">
                        <HeaderTemplate>
                            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table-style mtb15">
                                <thead>
                                    <tr>
                                        <th width="12%" scope="col">
                                            序号
                                        </th>
                                        <th width="31%" align="left" scope="col">
                                            资质名称
                                        </th>
                                        <th width="26%" align="left" scope="col">
                                            资质图片
                                        </th>
                                        <th width="12%" scope="col">
                                            操作
                                        </th>
                                    </tr>
                                </thead>
                                <tbody>
                        </HeaderTemplate>
                        <ItemTemplate>
                            <tr class="bg">
                                <td height="80" align="center">
                                    <%#Container.ItemIndex+1 %>
                                </td>
                                <td>
                                    <strong><a href="Detail.aspx?id=<%#Eval("Id") %>">
                                        <%#Eval("Name")%></a></strong>
                                </td>
                                <td>
                                    <img src="/<%#Eval("Filepath").ToString()+"s_"+Eval("Filename").ToString()%>" width="50"
                                        height="50">
                                </td>
                                <td align="center" class="operate">
                                    <a href="ModifyCertficate.aspx?id=<%#Eval("Id")%>">编辑</a><br>
                                    <a href="javascript:deleteConfirm('<%#Eval("Id")%>')">删除</a>
                                </td>
                            </tr>
                        </ItemTemplate>
                        <FooterTemplate>
                            <tr>
                                <td colspan="4" style="text-align: center">
                                    <asp:Label ID="LB_Empty" runat="server" Text=""><%=R_AuthenticationInfo.Items.Count == 0? "暂无数据":"" %></asp:Label>
                                </td>
                            </tr>
                            </tbody> </table>
                        </FooterTemplate>
                    </asp:Repeater>
                </div>
                <!--tabs-panel-->
            </div>
            <!--tabs-bd-->
        </div>
        <!--tabs-->
    </div>
</asp:Content>
